/**
 * 生成用户模拟数据
 * @param {number} count - 要生成的用户数量
 * @returns {Array} 用户对象数组
 */
const usm = {
  'useSearch.find.pro.list': {
    url: '/subject/list',
    mockFn: () => {
      // return {
      //   "code": 0,
      //   "msg": "",
      //   "pageNo": 1,
      //   "pageSize": 5,
      //   "total": 20,
      //   "data":generateUserList(20)
      // }
      // return generateUserList(20);
    },
  },
};
const sm = {
  'sm.find.pro.list': '/subject/list',
  'sm.command.edit': '/subject/edit',
  'sm.command.del.smitem': '/subject/delete/:subjectId',
  'sm.command.merge': '/subject/merge',
  'sm.find.treeById': '/subject/series/list/:subjectId',
  'sm.command.edit.tree.algType': '/subject/series/edit',
  'sm.command.list.total': '/subject/total',
  'sm.command.del.series': 'subject/series/delete',
};
const file = {
  'file.find.pro.hList': '/file/history/list',
  'file.command.add.upload': '/file/shard/upload',
  'file.command.del.allItem': '/file/history/clean',
  'file.command.del.item': '/file/history/delete/:id',
  'file.find.item.status': '/file/shard/upload/status',
  'file.command.download.subResultItem': '/file/download/patient',
  'file.command.download.taskItemResult': '/file/download/output/sub',
  'file.command.download.analysisSub': '/file/download/output/sub/zip/:analysisSubId', // add 2023-10-13 09:59
  'file.command.download.taskAllResult': '/file/download/output/all/:analysisId',
};

const alg = {
  'alg.find.groupList': '/alg/pipeline/list',
  'alg.find.parDetail': '/alg/pipeline/pars/:algId',
  'alg.find.json': '/alg/json/:pipelineId',
  'alg.save': '/alg/save',
};
const analysis = {
  'analysis.check.subject': '/analysis/subject/check',
  'analysis.command.add.task': '/analysis/subject/add',
  'analysis.command.stop.task': '/analysis/stop/:id',
  'analysis.command.rerun.task': '/analysis/rerun/:id',
  'analysis.command.delete.task': '/analysis/delete/:id',

  'task.find.pro.list': '/analysis/list',
  'analysis.find.base.resultList': '/analysis/subject/list/:analysisId',
  'analysis.find.base.fileList': '/analysis/subject/output/:analysisSubId',
  'analysis.find.pars.mapping': '/analysis/pars/mapping/:id',

  'analysis.find.subjectTaskList': '/analysis/subject/list/',
  'analysis.all.stepOutput': '/analysis/all/step/output/:id',
  'analysis.delete.stepOutput': '/analysis/delete/output',
};

// /project
const project = {
  'project.find.pro.list': '/project/list',
  // 'project.find.pro.list': {
  //   url: '/project/list',
  //   mockFn: () => {
  //     return [{ projectName: '假数据测试-mockFn', groupNameList: ['tag-a'] }];
  //   },
  // },
  'project.command.add': '/project/add',
  'project.command.edit': '/project/edit',
  'project.command.del': '/project/delete/:id',
  'project.find.pro.subjectList': '/project/list/subject',
  'project.command.del.subject': '/project/delete/subject/:groupId',
};
const user = {
  'user.find.pro.list': '/account/list',
  'user.command.add': '/account/add',
  'user.command.edit': '/account/edit', // 编辑、删除、禁用/启用
};
const iam = {
  'iam.command.login': '/account/login',
  'iam.command.logout': '/account/logout',
  'iam.command.edit': '/account/edit/current',
};
const common = {};
const notification = {
  'notification.find.pro.list': '/notification/list',
  'notification.find.unread.count': '/notification/unread/count',
  'notification.command.setItemsRead': '/notification/edit/read',
  'notification.command.setAllRead': '/notification/clean',
  'notification.command.readAll': 'notification/read/all',
};
const test = {
  'test.retry': '/hello/retry',
};
const license = {
  'license.add': 'license/add',
  'license.info': 'license/info', // license信息
};

const person = {
  // /account/list 真实接口地址
  // find.pro 分页查询
  // list 列表查询
  // 'person.find.pro.list': '/account/list',
  // 'person.find.pro.list': {
  //   url: '/person/list',
  //   mockFn: (payload: Payload) => {
  //     const data = generateUserList(50);
  //     data.length = payload.params.pageSize;
  //     return {
  //       code: 0,
  //       msg: '',
  //       pageNo: payload.params.pageNo,
  //       pageSize: 5,
  //       total: 50,
  //       data,
  //     };
  //   },
  // },
};
export default {
  ...usm,
  ...sm,
  ...file,
  ...iam,
  ...test,
  ...common,
  ...alg,
  ...analysis,
  ...project,
  ...user,
  ...notification,
  ...license,
  ...person,
};